riskofrain2fandomcom-20200214-history
Damage
Character Damage A Character's damage is the main factor all other damage scales off. A multiplier is built and added together: # +10% for each instance of BoostDamage the character has. # +10% for each Irradiant Pearl. # -5% for each beetlejuice debuff. Presumed to be the flying bugs from Beetle Queen. # The multiplier from the item Shaped Glass This multiplier is applied to the character's base damage plus their level's damage resulting in the character's damage. After this, the following reduction and increases are applied in order: # If the character is weakened, multiply their damage by 0.6. This means a 40% reduction. # If the Spinel Tonic is active, multiply the damage by 2. # If the Spinel Tonic isn't active and the character has at least 1 Tonic Affliction, reduce their damage by 0.95^x where X is the amount of Tonic Afflictions the character has. Hit Damage Each hit has damage info. This is scaled (possibly indirectly) from the character's damage. It holds the following properties: the attacker, the damage, if it is a critical strike, the damage type, the Proc Coefficient, the Proc chain(, position and force for knockback related calculations, the damage color and if the damage was rejected for displaying the damage). Upon hitting a character, the following things are done in order: # The character applies the damage to themselves. (see: Receiving Damage) # The game checks if on hit items need to trigger and DoTs need to be applied. (see: Handling Hits) # The game checks if the attack needs to explode. (see: Handling Hits) Receiving Damage Note that this is both true for players and enemies. The game begins by creating a copy of the incoming damage amount, let's call this 'amount', whereas we'll call the old damage 'original amount'. # If the character has succeeded the roll for Tougher Times, has just spawned in, or is otherwise invincible, set the damage rejected flag and stop applying any further damage. # If the attacker has crowbars and the character is above 90% from their maximum combined health, multiply amount by (1+0.5*Crowbars). # If the attacker has Armor-Piercing Rounds and the character is a boss, multiply amount by (1+0.2*Armor Piercing Rounds). # If the attacker has a Focus Crystal and is within 13 meters of the character, multiply amount by (1+0.15*Focus Crystals). # If the hit was a critical hit, multiply amount by 2. # If the damage doesn't bypass Armor (such as damage from a Shrine of Blood), apply the armor reduction/increase to amount. This can't reduce the amount to less than 1. # If the character is a player and amount is bigger than 90% of the character's combined health, reduce the amount to 90% of the character's combined health instead. This is commonly known as One Shot Protection or OSP 'for short. # If applicable, apply certain slows and roots to the character based on the damage type. # If the character holds a Brittle Crown, take away money equal to the maximum between original amount*Crowns and Crowns*Money*(combined health/amount). # Reduce barrier by ''amount, and amount by the barrier actually removed. # Reduce shield by amount, and amount ''by the shield actually removed. # Reduce the health by ''amount. If this would reduce a character's health below 1 and the damage is of the nonlethal type, such as hellfire tincture self damage and fall damage, set the health to 1 instead. # Apply the knockback. # (There's possibly a few steps in between here that this editor has not exactly traced to their entire conclusions.)Verify # If the character isn't player controlled and is frozen, set the execution threshold to 0.3 # If the character is an elite and the execution threshold is below the execution threshold set by Old Guillotines of the attacker, set the execution threshold to the threshold of the Guillotines. # If the character's combined health is below the amount dictated by the execution threshold, set their health to '''minus 1. # If the character is now dead (health less than or equal to 0), tell the game to check for on death effects. # If the character has an Old War Stealthkit, roll it with total damage dealt. Handling Hits Damage over Time Critical Strike All Survivors have a base of 1% critical chance. Upon Critical strike, damage dealt is twice the amount of a normal attack. See Receiving Damage. One Shot Protection A single hit taken can not deal more than (maxHealth + maxShield) * 0.9 + Barrier damage. This is checked after damage-reducing effects such as armor are applied. (See: Receiving Damage) Trivia * If you enable Damage Number in Gameplay Settings, the damage will be displayed after rounding up to the nearest integer for a maximum of 990,000,000, truncated as 990M. Challenge History Category:Mechanics